{include file="default/base/mall_top" /}

<link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/home_cart.css">
<script src="{$Think.HOME_SITE_ROOT}/js/goods_cart.js"></script>
<div class="dsc-header">
    <div class="logo">
        <a href="{$Think.HOME_SITE_URL}"><img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/{$Think.config.site_logo}"/></a>
    </div>
    <ul class="dsc-flow">
        <li class="current"><i class="step1"></i>
            <p>{$Think.lang.sc_my_shopping_cart}</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
        <li class=""><i class="step2"></i>
            <p>{$Think.lang.cart_index_ensure_info}</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
        <li class=""><i class="step3"></i>
            <p>{$Think.lang.cart_index_payment}</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
        <li class=""><i class="step4"></i>
            <p>{$Think.lang.cart_index_buy_finish}</p>
            <sub></sub>
            <div class="hr"></div>
        </li>
    </ul>
</div>


<div class="dsc-main">
    <div class="dsc-title">
        <h3>{$Think.lang.sc_my_shopping_cart}</h3>
        <h5>{$Think.lang.look_shopping_cart_list}</h5>
    </div>
    <form action="{:url('Buy/buy_step1')}" method="POST" id="form_buy" name="form_buy">
        <input type="hidden" value="1" name="ifcart">
        <table class="dsc-table-style" sc_type="table_cart">
            <thead>
                <tr>
                    <th class="w50"><label><input type="checkbox" checked="" value="1" id="selectAll">{$Think.lang.sc_select_all}</label></th>
                    <th></th>
                    <th>{$Think.lang.sc_goods}</th>
                    <th class="w120">{$Think.lang.sc_unit_price}({$Think.lang.sc_yuan})</th>
                    <th class="w120">{$Think.lang.sc_quantity}</th>
                    <th class="w120">{$Think.lang.cart_index_sum}({$Think.lang.sc_yuan})</th>
                    <th class="w80">{$Think.lang.sc_handle}</th>
                </tr>
            </thead>
            <tbody>

                <!-- S one  list -->
                {foreach name="cart_list" item="cart_info" key="cart_info_K" }
                <tr id="cart_item_{$cart_info.cart_id}" sc_group="{$cart_info.cart_id}" class="shop-list {if condition="$cart_info.state"}{else}item_disabled{/if}">
                    <td><input type="checkbox" {if condition="$cart_info.state"}checked{else}disabled{/if} sc_type="eachGoodsCheckBox" value="{$cart_info.cart_id}|{$cart_info.goods_num}" id="cart_id{$cart_info.cart_id}" name="cart_id[]"></td>
                    <td class="w60"><a href="{:url('Goods/index',['goods_id'=>$cart_info.goods_id])}" target="_blank" class="dsc-goods-thumb"><img src="{:goods_thumb($cart_info,240)}" alt="{$cart_info.goods_name}" /></a></td>
                    <td class="tl">
                        <dl class="dsc-goods-info">
                            <dt><a href="{:url('Goods/index',['goods_id'=>$cart_info.goods_id])}" target="_blank">{$cart_info.goods_name}</a></dt>
                        </dl>
                    </td>
                    <td class="w120"><em id="item{$cart_info.cart_id}_price">{$cart_info.goods_price}</em></td>
                    {if condition="$cart_info.state"}
                    <td class="w120 ws0">
                        <a href="JavaScript:void(0);" onclick="decrease_quantity({$cart_info.cart_id});"  class="add-substract-key tip">-</a>
                        <input id="input_item_{$cart_info.cart_id}" value="{$cart_info.goods_num}" orig="{$cart_info.goods_num}" changed="{$cart_info.goods_num}" onkeyup="change_quantity({$cart_info.cart_id}, this);" type="text" class="text w20"/>
                        <a href="JavaScript:void(0);" onclick="add_quantity({$cart_info.cart_id});" class="add-substract-key tip" >+</a></td>
                    {else}
                    <td class="w120">
                        {$Think.lang.invalid}<input type="hidden" value="{$cart_info.cart_id}" name="invalid_cart[]">
                    </td>
                    {/if}
                    <td class="w120">
                        {if condition="$cart_info.state"}
                        <em id="item{$cart_info.cart_id}_subtotal" sc_type="eachGoodsTotal">{$cart_info.goods_total}</em>
                        {/if}
                    </td>
                    <td class="w80">
                        <a href="javascript:void(0)" onclick="collect_goods('{$cart_info.goods_id}');">{$Think.lang.cart_index_favorite}</a><br/>
                        <a href="javascript:void(0)" onclick="drop_cart_item('{$cart_info.cart_id}');">{$Think.lang.sc_delete}</a>
                    </td>
                </tr>
                {/foreach}
                <!-- E one  list -->
                <tr>
                    <td class="tr" colspan="20">
                        <div class="dsc-account">
                            <dl>
                                <dt>{$Think.lang.total_store}：</dt>
                                <dd><em sc_type="eachStoreTotal"></em>{$Think.lang.sc_yuan}</dd>
                            </dl>
                        </div>
                    </td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="20"><div class="dsc-all-account">{$Think.lang.cart_index_goods_sumary}<em id="cartTotal">477.00</em>{$Think.lang.sc_yuan}</div></td>
                </tr>
            </tfoot>
        </table>
    </form>
    <div class="dsc-bottom"><a id="next_submit" href="javascript:void(0)" class="dsc-btn dsc-btn-acidblue fr"><i class="fa fa-pencil"></i>{$Think.lang.next_fillcheck_shopping_information}</a></div>
</div>
<script src="{$Think.HOME_SITE_ROOT}/js/goods_cart.js"></script>
{include file="default/base/mall_footer" /}